import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { SysTenantsService } from './sys_tenants.service';
import { CreateSysTenantDto } from './dto/create-sys_tenant.dto';
import { UpdateSysTenantDto } from './dto/update-sys_tenant.dto';

@Controller('sys-tenants')
export class SysTenantsController {
  constructor(private readonly sysTenantsService: SysTenantsService) {}

  @Post()
  create(@Body() createSysTenantDto: CreateSysTenantDto) {
    return this.sysTenantsService.create(createSysTenantDto);
  }

  @Get()
  findAll() {
    return this.sysTenantsService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.sysTenantsService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateSysTenantDto: UpdateSysTenantDto) {
    return this.sysTenantsService.update(+id, updateSysTenantDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.sysTenantsService.remove(+id);
  }
}
